package com._51cto.healthy.controller;

import com._51cto.healthy.pojo.SetMeal;
import com._51cto.healthy.service.SetMealService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Controller
public class SearchController {

    @DubboReference
    SetMealService setMealService;

    @GetMapping("/shop/index/article")
    public String article(String k, Model model){
        List<SetMeal> searchSetMeal = setMealService.searchSetMeal(k);
        model.addAttribute("searchSetMeal",searchSetMeal);
        return "search";
    }


}
